/*
 * Copyright © 2023-2025 puyinzhen
 * All rights reserved.
 *
 * The copyright of this work (or idea/project/document) is owned by puyinzhen. Without explicit written permission, no part of this work may be reproduced, distributed, or modified in any form for commercial purposes.
 *
 * This copyright statement applies to, but is not limited to: concept descriptions, design documents, source code, images, presentation files, and any related content.
 *
 * For permission to use this work or any part of it, please contact 1182810784@qq.com to obtain written authorization.
 */

.project-list-item {
  background-color: #2C2C3E;
  border: 1px solid #3A3A4E;
  border-radius: 8px;
  color: #FFFFFF;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  overflow: hidden;

  &:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border-color: #4FB8FF;
  }

  .project-item-cover {
    margin: 12px 12px 0;
    aspect-ratio: 16/9;
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    overflow: hidden;

    .operate-icon-list {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 16px;
      background: rgba(0, 0, 0, 0.5);
      opacity: 0;
      transition: opacity 0.2s ease;

      .operate-icon {
        color: #A0A0B2;
        font-size: 18px;
        padding: 8px;
        border-radius: 4px;
        transition: all 0.2s ease;
        cursor: pointer;

        &:hover {
          color: #4FB8FF;
          background-color: rgba(79, 184, 255, 0.1);
        }
      }
    }

    &:hover .operate-icon-list {
      opacity: 1;
    }
  }

  .project-item-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    margin-top: 8px;

    .project-name {
      flex: 1;
      font-size: 14px;
      line-height: 20px;
      font-weight: 500;
      color: #acacac;

      .project-rename-input {
        .ant-input {
          background-color: #2C2C3E;
          border-color: #3A3A4E;
          color: #FFFFFF;
          border-radius: 4px;

          &:hover, &:focus {
            border-color: #4FB8FF;
            box-shadow: 0 0 0 2px rgba(79, 184, 255, 0.2);
          }
        }
      }

      .project-name-content {
        padding: 4px 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
    }

    .rename-icon {
      color: #A0A0B2;
      font-size: 14px;
      margin-left: 8px;
      opacity: 0;
      transition: all 0.2s ease;
      cursor: pointer;

      &:hover {
        color: #4FB8FF;
      }
    }
  }

  &:hover .project-item-content .rename-icon {
    opacity: 1;
  }
}